package com.yc.oop1;

public class Car {
	public String color;
	public double price;
	public double oil;
	
	public void addOil(double money) {
		oil += money / 7.31;
	}
	
	public void driver(double mile) {
		oil -= mile / 7;
		if( oil <= 0 ) {
			oil = 0;
			System.out.println("抛锚了");
		}
	}
}
